#!/bin/bash

PROGRAM="./_aarch64/examples/joint_trajectory_driver/joint_trajectory_driver"
LIB_DIR="./deb/ros2/usr/local/lib/ros2"

#mkdir -p $LIB_DIR

for lib in $(readelf -d $PROGRAM | grep NEEDED | awk '{print $5}' | tr -d '[]'); do
    cp $lib $LIB_DIR/
done

#tar -czvf libs.tar.gz -C ./libs .

